<template>
	<select
		class="select"
		:title="title"
		@change="(e) => handleChange(e.target.value)"
	>
		<option
			class="select-option"
			v-for="item in visibleData"
			:key="item.value"
			:value="item.value"
		>
			{{ item.label }}
		</option>
	</select>
</template>
<script>
export default {
	name: 'select-view',
	props: [ "visibleData", "title"],
	data() {
		return {

		};
	},

	mounted() {
		this.handleChange(this.visibleData[0].value);
	},

	methods: {
		handleChange(value) {
			this.$emit('change', value);
		},
	},
};
</script>
<style>
</style>
